﻿using RockBus.DataContracts;
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;

namespace RockBus.Transport.Interfaces
{
    [ServiceContract(Namespace = StringConstants.RockBusNamespace, SessionMode = SessionMode.Allowed)]
    public interface IOneWay
    {
        [OperationContract(AsyncPattern = true, IsOneWay = true, Action = "*")]
        IAsyncResult BeginProcessMessage(Message message, AsyncCallback callback, object state);

        void EndProcessMessage(IAsyncResult result);
    }

    [ServiceContract(Namespace = StringConstants.RockBusNamespace, SessionMode = SessionMode.Allowed)]
    public interface IOneWayTxn
    {
        [OperationContract(AsyncPattern = true, IsOneWay = true, Action = "*")]
        IAsyncResult BeginProcessMessage(Message message, AsyncCallback callback, object state);

        void EndProcessMessage(IAsyncResult result);
    }
}